package com.mindcraft.chat.message;

import com.alibaba.fastjson.JSONObject;
import com.mindcraft.chat.mapper.ImChatUserMessageMapper;
import com.mindcraft.chat.po.ImChatUserMessage;
import com.mindcraft.chat.vo.ImChatUserMessageVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Service;

@Service
public class MessageServiceImpl implements MessageService{

    @Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;

    @Autowired
    private ImChatUserMessageMapper messageMapper;

    @Override
    public void sendMessage(String message) {
        System.out.println("等待发送的信息为：" + message);
        jmsMessagingTemplate.convertAndSend("order.queue.message",message);
    }

    @Override
    public String doMessage() {
        //手动处理消息

        return null;
    }

}
